#include<bits/stdc++.h>
using namespace std;
long long n;
int r[100005];
queue<int> q;
int main() {
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin >> n;

    for (int i = 1; i <= n; i++) {
        cin >> r[i];
    }

    sort(r+1,r+n+1);
    int sum = 0;
    for (int i = 1; i <= n; i++) {
        q.push(r[i]);
        if(r[i] > q.front()) {
            q.pop();
            sum++;
        }
    }
    cout << n-sum;
    return 0;
}



